<div class="content container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <h2 class="page-title"><?php echo $ctrl['jenis'];?> Data</h2>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span6">
            <section class="widget">
                <div class="body">
                 <?php if (validation_errors()) { ?>
                 <div class="alert alert-error">
                    <button type="button" class="close" data-dismiss="alert">x</button>
                    <h4>Terjadi Kesalahan!</h4>
                    <hr>
                    <?php echo validation_errors(); ?>
                </div>
                <?php } ?>
                <?php echo form_open_multipart('dashboard/simpandata', 'class="form-horizontal"'); ?>
                <fieldset>
                    <legend class="section">Form Pengisian</legend>
                    <div class="control-group controls-row">
                        <label class="control-label" for="normal-field">Foto</label>
                        <div class="controls">
                         <div class="dropzone span5">
                            <?php if($foto == ""){?>
                            <img src='<?php echo base_url('foto/01default.jpg')?>' alt="" />
                            <?php } else { ?>
                            <img src='<?php echo base_url('foto').'/'.$foto;?>' alt="" />
                            <?php } ?>
                        </div>
                    </div>
                </div>
                <div class="control-group controls-row">
                    <div class="controls">
                        <?php if($foto == ""){?>
                            <input type="file" name="userfile" size="20" />
                        <?php } else { ?>
                        <a href="<?php echo site_url('dashboard/hapus_foto').'/'.$ctrl['id'];?>"><button type="button" class="btn btn-danger btn-small">
                            <i class="icon-trash"></i>
                            <span>Delete</span>
                        </button></a>
                        <?php } ?>
                    </div>
                </div>
                <div class="control-group controls-row">
                    <label class="control-label" for="normal-field">No. AK</label>
                    <div class="controls">
                        <input type="text" id="normal-field" class="span8" placeholder="XXXX XXX" name="nomor_ak" value="<?php echo $nomor_ak; ?>" />
                    </div>
                </div>
                <div class="control-group controls-row">
                    <label class="control-label " for="tooltip-enabled">Nama</label>
                    <div class="controls">
                        <input type="text" id="tooltip-enabled" class="span8" data-placement="top" name="nama" value="<?php echo $nama; ?>" />
                    </div>
                </div>
                <div class="control-group controls-row">
                    <label class="control-label " for="tooltip-enabled">Pangkat</label>
                    <div class="controls">
                        <input type="text" id="tooltip-enabled" class="span8" data-placement="top" placeholder="sersan" name="pangkat" value="<?php echo $pangkat; ?>" />
                    </div>
                </div>
                <div class="control-group controls-row">
                    <label class="control-label " for="tooltip-enabled">Nomor Senjata</label>
                    <div class="controls">
                        <input type="text" id="tooltip-enabled" class="span8" data-placement="top" placeholder="Hover over me.." name="nosenjata" value="<?php echo $nosenjata; ?>"  />
                    </div>
                </div>
            </fieldset>
            <input type="hidden" name="st" value="<?php echo $ctrl['jenis']; ?>" />
            <input type="hidden" name="id" value="<?php echo $ctrl['id']; ?>" />
            <input type="hidden" name="foto" value="<?php echo $foto; ?>" />
            <div class="form-actions ">
                <div>
                    <input type="submit" class="btn btn-primary" value="submit" name="submit" />
                    <a href="<?php echo site_url('dashboard');?>"><button type="button" class="btn">Cancel</button></a>
                </div>
            </div>
            <?php echo form_close(); ?>
        </div>
    </section>
</div>
</div>
</div>